package com.atgouwu.mall.product.feign;

import com.atgouwu.mall.common.utils.R;
import com.atgouwu.mall.product.fallback.SeckillFeignServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 远程调用seckill秒杀服务
 */
@FeignClient(value = "seckill", fallback = SeckillFeignServiceFallBack.class)
public interface SeckillFeignService {

    //根据skuId查询商品是否参加秒杀活动
    @GetMapping(value = "/seckill/seckill/sku/{skuId}")
    R getSkuSeckilInfo(@PathVariable("skuId") Long skuId);

}
